package com.itheima.pratice.test;

import java.util.TreeMap;

public class StudentMap {//TreeMap添加键为学生对象，实现排序
    public static void main(String[] args) {
        TreeMap<Student, String> treeMap = new TreeMap<>();

        treeMap.put(new Student("long",20),"yiyang");
        treeMap.put(new Student("long",22),"yiyang");
        treeMap.put(new Student("long",20),"yiyang");

        System.out.println(treeMap);
    }
}
